package com.sandy.gorm7

import grails.gorm.annotation.Entity
import groovy.transform.ToString
import org.grails.datastore.gorm.GormEntity

@ToString
@Entity
class Manufacturer implements GormEntity<Manufacturer> {
    String name
    String postCode
    static hasMany = [vehicles: Vehicle]

    static mapping = {
        table 'manu'
        version false
        name column: 'nm'
        postCode type: 'text'
    }
    static constraints = {
        name blank: false
    }
}
